﻿
@{
    ViewBag.Title = "EmployeePageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link rel="stylesheet" href="~/assets/portal/assets/css/common.css" />
    <link rel="stylesheet" href="~/bussiness/js/base/reset.css" />
    <link rel="stylesheet" href="~/bussiness/js/pg/Performance/edit.css" />
    <style>

        #editor—wrapper {
            /*max-width: 90%;*/
            width: 1200px !important;
            border: 1px solid #ccc;
            z-index: 100; /*  按需定义 */
        }

        .title {
            font-weight: bolder;
        }

        #toolbar-container {
            border-bottom: 1px solid #ccc;
        }

        #editor-container {
            min-height: 310px;
            margin-bottom: 200px;
        }

            #editor-container .title::before {
                content: ""
            }

        .ant-select-arrow, .ant-select-clear {
            position: absolute;
            right: 10px;
        }

        .stitle {
            font-size: 16px;
            font-weight: 600;
            color: #424758;
            display: flex;
            align-items: center;
        }

            .stitle::before {
                content: "";
                margin-right: 10px;
                display: inline-block;
                width: 4px;
                height: 18px;
                background: #0064E5;
            }

        .stable {
            border-collapse: collapse; /* 折叠边框，使之变为单一线划分 */
            border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
            width: 100%;
            max-height: 800px;
            overflow-y: scroll;
        }

            .stable th {
                background: #f2f6f9;
                font-size: 14px;
                font-weight: 600;
            }

            .stable th, .stable td {
                border: 1px solid #e1e5ea; /* 设置表格、表头、单元格边框 */
                text-align: center;
                height: 48px;
            }
    </style>
}
<div id="EmergencyManagementETADD" class="font-['SourceHanSansSC']">
    <a-style-provider hash-priority="high">
        <a-config-provider :locale="vlocale">
            <header class="px-5 box-border">
                <div class="flex items-center">
                    <div class="w-full h-[48px] text-[13px]  rounded-lg mx-auto my-[10px]  bg-white  text-[#888888] text-3xl flex items-center px-10">   <div class="w-22 h-22 bg-blue-200 mr-5"> <img class="w-full h-full cursor-pointer" v-on:click="EmergencyManagementETADDParams.vvback()" src="~/Assets/nimgs/exit.png" alt="返回" /></div> <span class="text-[]">应急管理<span class="mx-2">/</span><span class="text-[#424758] text-[15px]">{{EmergencyManagementETADDParams.urlinfo.value.type?{1:'应急队伍编辑',9:'应急队伍详情'}[EmergencyManagementETADDParams.urlinfo.value.type]:'新增应急队伍'}}  </span> </span>  </div>
                </div>
                <a-card :bordered="true" class="w-full  mt-12">
                    <template #title>
                        <div class="w-full flex justify-between items-center;">
                            <div class="flex items-center"> <div>应急队伍</div> <div class="ml-7"></div></div>
                        </div>
                    </template>
                    <a-spin :spinning="EmergencyManagementETADDParams.uploadLock.value" tip="加载中，请耐心等待..." />
                    <div class="stitle" style="margin:20px 0">基本信息</div>
                    <div id="tableContainer"></div>
                    <a-form style="margin-top:10px"
                            ref="FormRule"
                            layout="inline"
                            :model="EmergencyManagementETADDParams.formData.value">

                        <a-form-item label="发布人：">
                            <a-input disabled v-model:value="EmergencyManagementETADDParams.formData.value.user" style="width:200px" />
                        </a-form-item>
                        <a-form-item label="更新日期：">
                            <a-input disabled v-model:value="EmergencyManagementETADDParams.formData.value.time" style="width: 200px" />
                        </a-form-item>
                        <a-form-item label="提交部门：">
                            <a-select show-search
                                      style="width:200px"
                                      :filter-option="EmergencyManagementETADDParams.filterOption"
                                      placeholder="请选择部门"
                                      :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9"
                                      v-model:value="EmergencyManagementETADDParams.formData.value.DepartmentId"
                                      :options="EmergencyManagementETADDParams.deptList.value">

                            </a-select>
                        </a-form-item>
                        <a-form-item label="级别">
                            <a-select allow-clear
                                      placeholder="请选择级别"
                                      show-search
                                      v-on:change="EmergencyManagementETADDParams.typeChange"
                                      :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9"
                                      :filter-option="EmergencyManagementETADDParams.filterOption"
                                      v-model:value="EmergencyManagementETADDParams.formData.value.TypeId"
                                      :options="EmergencyManagementETADDParams.levelList.value"
                                      style="width:200px">
                            </a-select>
                        </a-form-item>
                        <a-form-item>

                    </a-form>
                    <div class="stitle" style="margin:20px 0">成员信息</div>
                    <a-card :bordered="true" class="w-full  mt-12">
                        <template #title>
                            <div class="w-full flex justify-between items-center;">
                                <div class="flex items-center"> <div>成员信息列表</div> <div class="ml-7"></div></div>
                                <div v-if="EmergencyManagementETADDParams.urlinfo.value.type!=9">
                                    <a-space>

                                        <a-button v-on:click="EmergencyManagementETADDParams.handleDownloadTemplate" style="background: #17d46b;color:white">下载模版</a-button>


                                        <a-tooltip v-if="!EmergencyManagementETADDParams.formData.value.TypeId">
                                            <template #title>
                                                导入模版需要先选择级别
                                            </template>
                                            <a-button v-if="EmergencyManagementETADDParams.urlinfo.value.type!=9" disabled type="primary">导入模版</a-button>
                                        </a-tooltip>
                                        <a-upload v-else action="#"
                                                  :show-upload-list="false"
                                                  :before-upload="EmergencyManagementETADDParams.handleBeforeUpload"
                                                  v-on:change="EmergencyManagementETADDParams.handleImport">
                                            <a-button v-if="EmergencyManagementETADDParams.urlinfo.value.type!=9" type="primary">导入模版</a-button>


                                        </a-upload>
                                    </a-space>
                                </div>
                                <div v-else>
                                    <a-button v-on:click="EmergencyManagementETADDParams.IhandlePdfExport" style="background: #17d46b;color:white">导出</a-button>
                                </div>
                            </div>
                        </template>
                        <table class="stable">
                            <tr>
                                <th>序号</th>
                                <th>姓名</th>
                                <th>工号</th>
                                <th>职位</th>
                                <th>职务</th>
                                <th>联系方式</th>
                                <th>备注</th>
                                <th v-if="EmergencyManagementETADDParams.urlinfo.value.type!=9"><a-button v-on:click="EmergencyManagementETADDParams.addConfig" type="primary">新增</a-button></th>
                            </tr>
                            <tr v-for="(e,i) in EmergencyManagementETADDParams.settingList.value" :key="i">
                                <td>
                                    {{i+1}}
                                </td>
                                <td>
                                    <a-input style="width: 96%" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="e.Name">
                                    </a-input>
                                </td>
                                <td>
                                    <a-input style="width: 96%" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="e.UserNo">
                                    </a-input>
                                </td>
                                <td>
                                    <a-input style="width: 96%" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="e.Title">
                                    </a-input>
                                </td>
                                <td>
                                    <a-select allow-clear
                                              show-search
                                              :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9||!EmergencyManagementETADDParams.formData.value.TypeId"
                                              style="width: 96%"
                                              :filter-option="EmergencyManagementETADDParams.filterOption"
                                              placeholder="请先选择级别"
                                              v-model:value="e.JobId"
                                              :options="EmergencyManagementETADDParams.jobList.value"></a-select>
                                </td>
                                <td>
                                    <a-input style="width: 96%" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="e.Phone">
                                    </a-input>
                                </td>
                                <td>
                                    <a-input style="width: 96%" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="e.Remark">
                                    </a-input>
                                </td>
                                <td v-if="EmergencyManagementETADDParams.urlinfo.value.type!=9">

                                    <a-button v-on:click="EmergencyManagementETADDParams.delConfig(i,e)" type="primary" danger>删除</a-button>
                                </td>
                            </tr>
                        </table>

                    </a-card>
                    @*<a-form-item label="附件：">
            <a-upload v-model:file-list="EmergencyManagementETADDParams.uploadImg.value.fileList"
                      action="#"
                      :item-render="EmergencyManagementETADDParams.itemRender.value"
                      v-on:change="EmergencyManagementETADDParams.handleChange">
                <a-button v-if="EmergencyManagementETADDParams.uploadImg.value.fileList.length < 8 && EmergencyManagementETADDParams.urlinfo.value.type!=9" type="primary">+ 上传附件</a-button>

            </a-upload>
        </a-form-item>*@
                    <a-form-item label-align="right" style="margin-top:20px" label="备注：">
                        <a-textarea style="width:600px" :disabled="EmergencyManagementETADDParams.urlinfo.value.type==9" v-model:value="EmergencyManagementETADDParams.formData.value.Remark">
                        </a-textarea>
                    </a-form-item>
                </a-card>

            </header>

            <m-bottom-btns></m-bottom-btns>
        </a-config-provider>
    </a-style-provider>
</div>
@section Js{
    <script src="~/bussiness/js/base/tailwind.js"></script>
    @*<script src="~/bussiness/js/base/font.js"></script>
    <script src="~/bussiness/js/base/jspdf.js"></script>
    <script src="~/bussiness/js/base/autotable.js"></script>
    <script src="~/bussiness/js/base/exportToPDF.js"></script>*@

    <script>
    </script>
    <script type="module">
        import Composition from '../../bussiness/js/pg/EmergencyManagement/ETAdd.js?v=@DateTime.Now.ToString("yyyyMMddHHmm")'
        import localeValues from '../../Bussiness/js/base/es/locale/zh_CN.js'
        singalApp('EmergencyManagementETADD', Composition, localeValues)
    </script>
}
